<?php
@$admin=$_REQUEST['admin'];
@$pwd=$_REQUEST['password'];
if(!empty($admin) && !empty($pwd)){
    $pdo=new PDO('mysql:dbname=shuju;charset=utf8','root');
    $use=$pdo->prepare('select adm from customerLogin where adm=:aa');
    $use->execute(array('aa'=>$admin));
    $data=$use->fetchAll(PDO::FETCH_NAMED);
    if(!empty($data)){
          $usemm=$pdo->prepare('select * from customerLogin where adm=:b1 and pwd=:b2');
          $usemm->execute(array('b1'=>$admin,'b2'=>$pwd));
          $datamm=$usemm->fetchAll(PDO::FETCH_NAMED);
          if(!empty($datamm)){
              session_start();
              $_SESSION["ZH"]=$admin;
              echo "true";
          }else{
              echo "mmF";
          }
    }else{
        echo "zhF";
    }
}else{
    header("Location:../index.php");
}
?>
